<?php

namespace App\Http\Controllers\Backend;

use App\Http\Controllers\Controller;
use App\Models\Customer\Customer;

class CustomerController extends Controller
{

    public function index()
    {
        $user = \Auth::user();
        if (!$user->hasPermissionTo('微信用户')) {
            return view('error.error');
        }
        $customers = Customer::with('info')->paginate(15);
        return view('customer.list', ['customers' => $customers]);
    }
}